program FindPi;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  p, x, y: real;
  n0, n, x1, y1, r, i: integer;

begin
  x1:=2;
  y1:=2;
  r:=x1 div 2;
  randomize;
  n0:=0;
  n:=0;
  for i:= 1 to 100000 do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)) <= 1 then
    begin
      n0:=n0+1;
    end;
    n:=n+1;
  end;
  p:=4*n0/n;
  write(p:0:6);
  readln;
end.
